package com.sskj.fca.ui.activity;


import android.widget.TextView;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.sskj.lib.RConfig;
import com.sskj.lib.base.BaseActivity;
import com.sskj.fca.R;
import com.sskj.fca.bean.NoticeMsgBean;
import com.sskj.fca.presenter.NoticeCenterActivityPresenter;

import butterknife.BindView;

@Route(path = RConfig.APP_NOTICE_CENTER_DETAIL)//通知中心详情
public class NoticeCenterDetailActivity extends BaseActivity<NoticeCenterActivityPresenter> {
    @Autowired
    String noticeId;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.tv_date)
    TextView tvDate;
    @BindView(R.id.tv_content)
    TextView tvContent;

    @Override
    protected int getLayoutResId() {
        return R.layout.app_activity_notice_center;
    }

    @Override
    public NoticeCenterActivityPresenter getPresenter() {
        return new NoticeCenterActivityPresenter();
    }

    @Override
    protected void initView() {
        setTitle("通知中心");
        ARouter.getInstance().inject(this);
        mPresenter.noticeMsg(noticeId);
    }

    public void updataMsg(NoticeMsgBean data) {
        tvTitle.setText(data.getList().getContent());
        tvDate.setText(data.getList().getCreate_time());
        tvContent.setText(data.getList().getRemark());
    }
}
